package com.hruiworks.campusgroup.service;

import org.quartz.*;

/***
 *
 */
public interface ScheduledJobService {

    Scheduler getScheduler();

    /**
     * 注册定时任务
     * @param jobDetail 任务
     * @param trigger 触发器
     */
    void registerJob(JobDetail jobDetail, Trigger trigger);

    <T extends Job> void registerJob(Class<T> jobClass, String jobName, String jobGroup, String triggerName, String triggerGroup, String cron);


    /**
     * 修改任务触发器时间
     * @param triggerName  触发器名
     * @param triggerGroup 触发器group
     * @param cron cron表达式
     */
    void changeJobTriggerTime(String triggerName, String triggerGroup, String cron);



}
